<?php

class stg_Player extends stg_Object
{
	protected $_owners = array(); // of User
	protected $_user;
	protected $_known_universe;
	protected $_faction;

	function __construct($name, $user, $faction)
	{
		$this->class_name = 'player'; 
		parent::construct($name);
		$this->add_permission('known_universe', 'stg_Game');
		e('Player '.$name.' is managed by '.$user->name);
		$this->user = $user;
		$this->faction = $faction;
	}

	protected $_movement = array();

	public function add_command($object_id, $action, $arguments) {
		e("New order: {$this->name} orders [$object_id] to $action with arguments (".implode(",", $arguments).")");
		$this->_movement[] = new stg_Order($this->universe, $object_id, $this, $action, $arguments);
	}
}

?>
